﻿@model nhannguyentn.Models.BlogPostModel

@{
    ViewBag.Title = "Post";
}

<h2>Post</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>BlogPostModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.PostID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PostID)
            @Html.ValidationMessageFor(model => model.PostID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CategoryID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CategoryID)
            @Html.ValidationMessageFor(model => model.CategoryID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PostContent)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.PostContent)
            @Html.ValidationMessageFor(model => model.PostContent)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateCreated)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateCreated)
            @Html.ValidationMessageFor(model => model.DateCreated)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateModified)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateModified)
            @Html.ValidationMessageFor(model => model.DateModified)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsPublished)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsPublished)
            @Html.ValidationMessageFor(model => model.IsPublished)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsCommentEnabled)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsCommentEnabled)
            @Html.ValidationMessageFor(model => model.IsCommentEnabled)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Raters)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Raters)
            @Html.ValidationMessageFor(model => model.Raters)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Rating)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Rating)
            @Html.ValidationMessageFor(model => model.Rating)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

<script type="text/javascript">
    CKEDITOR.replace('PostContent');
    
</script>